package com.project.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDate;

/**
 * @author zhangyang
 * @since 2021-10-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_business")
public class Business extends Model {

    private static final long serialVersionUID = 1L;
    /**
     * 商家id
     */
    @TableId(value = "pk_businessId", type = IdType.AUTO)
    private Integer businessId;

    /**
     * 商家编号
     */
    @TableField("b_code")
    private String code;

    /**
     * 商家名字
     */
    @TableField("b_name")
    private String name;

    /**
     * 店长名称
     */
    @TableField("b_shopowner")
    private String shopowner;

    /**
     * 状态
     */
    @TableField("b_status")
    private String status;

    /**
     * 开店时间
     */
    @TableField("b_startTime")
    private LocalDate startTime;

    /**
     * 商家评分
     */
    @TableField("b_score")
    private Integer score;

    /**
     * 商家地址
     */
    @TableField("b_address")
    private String address;

    /**
     * 商家营业执照
     */
    @TableField("b_license")
    private String license;

    /**
     * 商家联系电话
     */
    @TableField("b_phone")
    private String phone;

    /**
     * 商家接单总额
     */
    @TableField(exist = false)
    private int orderMoney;

    /**
     * 商家接单总数
     */
    @TableField(exist = false)
    private int orderNum;
}
